<?php
	$pid = explode(',', $model->arc_cid);
	$pid = $pid[0];
	$menu = array_reverse(Category::model()->generateBreadcrumbs($pid));
	
	$this->breadcrumbs = array_merge($this->breadcrumbs,$menu);
	$this->breadcrumbs = array_merge($this->breadcrumbs,array(UtilTools::strSlice($model->arc_title,0,50)));
	
	$this->pageTitle = Category::model()->generatePageTitle(array_reverse($this->breadcrumbs,'_')).Yii::app()->name;
	
	 
	 $this->widget('ext.code.syntaxhighlighter.syntaxhighlighterWidget');
?>
            <!-- Post -->
            <div class="post single clearfix">
  

         
            
                <h2><?php echo $model->arc_title; ?></h2>
                <ul class="post-meta">
                    <li class="author">By <a href="./blog_post.html"><?php echo $model->author->user_name;?></a></li>
                    <li class="date"><?php echo UtilTools::timeop($model->arc_created);?></li>
                    <li class="tags"><?php echo Tag::model()->tagsToLinks($model->arc_tags, 'blog/tags');?></li>
                    <li class="comments"><a href="./blog_post.html">有<?php echo count($model->comment);?>条评论</a></li>
					<?php if(Yii::app()->user->isGuest):?>
                    <li class="modify"><?php echo UtilAuth::getAuthLinks('修改', array('update','id'=>$model->arc_id));?></li>
					<?php endif;?>
                </ul>
                <div class="post-entry">
 					<?php echo $model->arc_content;?>
                </div>
                <hr />
                <?php $this->widget('application.components.news.PreNext', array('id'=>$model->arc_id)); ?>
            </div>
            <!-- /Post -->
            
            <h5>相关内容</h5>
            <ul id="tabs">
                <li class="active"><a href="#tab1">评论</a></li>
                <li class=""><a href="#tab2">我有话要说</a></li>
            </ul>
            <div id="tabs_content_container">
                <div style="display: block;" id="tab1" class="tab-content">
                     
                     <?php $this->widget('application.components.comment.CommentListWidget', array(
                            'controller'=>$this->id,
                            'action'=>$this->action->id,
                            'id'=>$model->arc_id 
                     ) ); ?>

                </div>
                <div style="display: none;" id="tab2" class="tab-content">
                    <?php $this->widget('application.components.comment.CommentFormWidget',array(
                            'id'=>$model->arc_id,
                            'controller'=>$this->id,
                            'action'=>$this->action->id
                    )); ?>
                </div>
            </div>           
